/**
 * cookie操作
 */

import { useCookies } from "@vueuse/integrations/useCookies";

const TokenKey = "user-token";
const cookie = useCookies();

// 获取token
export function getToken() {
  return cookie.get("user-token");
}

// 设置token
export function setToken(token) {
  return cookie.set("user-token", token);
}

// 删除token
export function removeToken() {
  return cookie.remove("user-token");
}

// 获取token
export function getUser() {
  return cookie.get("userName");
}

// 设置token
export function setUser(token) {
  return cookie.set("userName", token);
}

// 删除token
export function removeUser() {
  return cookie.remove("userName");
}
